package com.iheima.branch;

import java.util.Random;
import java.util.Scanner;

public class test2 {
    public static void main(String[] args) {
        System.out.println("请输入需要几位的验证码");
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        String str="";
        test2(num,str);
    }
    public static void test2(int num,String str){
        int i=0;
        while(i<num) {
            i++;
            Random rand = new Random();
            int nums = rand.nextInt(10);
            str+=nums;
        }
        System.out.println(str);
    }
}
